<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Website Horizontal Scrolling with CSS &amp; jQuery &ndash; Sunflowa Media Web Site</title>
</head>

<link rel="stylesheet" type="text/css" href="css/index.css" />

<!-- The JavaScript -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {

	function staticNav() { 
		var sidenavHeight = $("#sidenav").height();
		var winHeight = $(window).height();
		var browserIE6 = (navigator.userAgent.indexOf("MSIE 6")>=0) ? true : false;

		if (browserIE6) {
			$("#sidenav").css({'position' : 'absolute'});
		} else {
			$("#sidenav").css({'position' : 'fixed'});
		}
	
		if (sidenavHeight > winHeight) {
			$("#sidenav").css({'position' : 'static'});
		}
	}
	
	staticNav();
	
	$(window).resize(function () { //Each time the viewport is adjusted/resized, execute the function
		staticNav();
	});

});
</script>

<body>

    <div class="container">
        <div id="sidenav">
        <h2 class="categories">Categories</h2>
        <ul>
            <li><a href="#">Categories name</a></li>
            <li><a href="#">Categories name</a></li>
            <li><a href="#">Categories name</a></li>
            <li><a href="#">Categories name</a></li>
        </ul>
        <h2 class="sites">Other Links</h2>
        <ul>
            <li><a href="http://www.kakihwa.com/" target="_blank">Kaki is coming</a></li>
            <li><a href="http://www.wooshoo.cn/" target="_blank">WooShoo</a></li>
            <li><a href="http://www.josphin.com/" target="_blank">Josphin's Show</a></li>
            <li><a href="http://www.jb51.net/" target="_blank">jb51.net</a></li>
            <li><a href="http://www.man-man.com.cn/" target="_blank">Man Man Web site</a></li>
        </ul>
        </div>
    
        <div id="content">
        <h1 class="title_name">Fixed SideNav Layout with <span>CSS &amp; jQuery</span><small>by Sunflowa Media</small></h1>
        
        <h2>This is the title</h2>
        <p>Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents</p>
        
        <h2>This is the title2</h2>
        <p>Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents</p>
        
        <h2>This is the title3</h2>
        <p>Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents</p>
        
        <h2>This is the title4</h2>
        <p>Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents</p>
        
        <h2>This is the title5</h2>
        <p>Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents</p>
        
        <h2>This is the title6</h2>
        <p>Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents</p>
        
        <h2>This is the title7</h2>
        <p>Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents</p>
        
        <h2>This is the title8</h2>
        <p>Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents Articles contents</p>
        
        <p class="link">Welcome to <a href="http://www.sunflowamedia.com/" target="_blank">Sunflowa Media Website</a></p>
        </div>
    </div>

</body>
</html>
